<!--
 * @Author: 卡卡 1071780426@qq.com
 * @Date: 2023-09-14 12:31:39
 * @LastEditors: 卡卡 1071780426@qq.com
 * @LastEditTime: 2023-10-09 10:34:46
 * @FilePath: \mould\src\components\BehaViorManage\workYear\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
    <div class="Control-1 mechanism_dialogS closure" id="comcn">
        <el-dialog :title="title" v-dialogDrag :visible.sync="visible" @close="closeDialog" :append-to-body="true" top="5%">
            <div class="dialogBody common commonClassDialog" :style="{ height: dialogHeight }" style="width: 100%">
                <el-menu v-if="btnStatus[2]" :default-active="activeIndex" class="el-menu-demo" mode="horizontal"
                    @select="handleSelect">
                    <el-menu-item index="1">工作计划信息</el-menu-item>
                    <el-menu-item index="2">完成情况信息</el-menu-item>
                </el-menu>
                <div v-if="activeIndex == '1'" class="commonleft">
                    <publicForm v-if="btnStatus[0]" :timestamp="formData.fWorkfile" style="height: 280px" ref="publicForm"
                        lableWidth="155px" :formObj="formObj" :formData="formData" :fileList="fWorkfilelist"
                        @delteFile="delteFile($event, 0)" @selectChange="selectChange" @inputFocus="inputFocus">
                    </publicForm>

                    <div class="baseTitle" v-if="btnStatus[1]">工作计划审核</div>
                    <!-- //计划审核 -->
                    <publicForm1 v-if="btnStatus[1]" style="height: 100px" ref="planReview" lableWidth="155px"
                        :formObj="planReview" :formData="planReviewData">
                    </publicForm1>
                </div>
                <div v-if="activeIndex == '2'" class="commonright">
                    <publicForm v-if="btnStatus[2]" @selectChange="selectChange" :timestamp="formFinishData.fFinishfileurl"
                        ref="formFinishForm" style="height: 200px" lableWidth="155px" :formObj="formFinishObj"
                        :formData="formFinishData" @delteFile="delteFile($event, 1)" :fileList="FinishfileList"
                        @inputFocus="inputFocus">
                    </publicForm>

                    <div class="baseTitle" v-if="btnStatus[3]">完成情况审核</div>
                    <!-- //完成情况审核 -->
                    <publicForm1 v-if="btnStatus[3]" style="height: 100px" ref="planFinishReview" lableWidth="155px"
                        :formObj="planFinishReview" :formData="planFinishReviewData">
                    </publicForm1>
                </div>
            </div>
            <div class="newlyAdded_btn" v-if="btnShow">
                <el-button type="primary" :disable="isLock" @click="yj_saveForm('formData')">保存</el-button>
                <el-button type="warning" @click="visible = false">关闭</el-button>
            </div>
        </el-dialog>

        <!-- 根据组织机构树选人---多选 -->
        <div class="Control-1 mechanism_dialogS closure">
            <el-dialog title="选择抄送人" :modal-append-to-body="false" v-dialogDrag :visible.sync="dialogTree"
                v-loading="loadingtree" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
                element-loading-background="rgba(0, 0, 0, 0.2)">
                <div class="dialogBody common" :style="{ height: '650px' }" style="overflow: hidden; width: 100%">
                    <div style="margin-bottom: 20px; height: 100%; width: 100%">
                        <div class="publicForm addMemberCheckBox"
                            style="height: calc(100% - 40px); overflow-y: auto; width: 100%">
                            <div class="addMemberCheckTree">
                                <div class="companyBox">

                                    <div class="companyBox_box" v-for="(item, index) in companyInfo" :key="index"
                                        @click="selectCompanys(item, index)" :style="{
                                            color: item.show === true ? '#fff' : '#555',
                                            background:
                                                item.show === true ? '#1559ba' : 'aliceblue',
                                        }">
                                        {{ item.fShortname }}
                                    </div>
                                </div>
                                <div class="departmentBox">
                                    <div class="departmentTitle" v-for="(item, index) in departmentList" :key="index"
                                        @click="seletDepartment(item, index)">
                                        <a href="javascript:;" :class="num === item.fDepartmentId ? 'activetext' : ''"
                                            :title="item.fShortName">
                                            {{ item.fShortName }}</a>
                                    </div>
                                </div>
                            </div>

                            <div class="addMemberCheckLeft addMemberCheckLefts">
                                <el-checkbox-group v-model="checkboxGroup" @change="selectRealname($event, personList)">
                                    <el-checkbox-button v-for="item in personList" :label="item.fUserid" :key="item.fUserid"
                                        :value="item.fRealname">
                                        <div class="addMemberCheck">
                                            <div class="MemberIcon">
                                                <!--  -->
                                                <!-- -->
                                                <img :src="item.fGender == 0 ? girls : boys" alt="" />
                                            </div>
                                            <div class="MemberDetailInfos">
                                                <div class="name">{{ item.fRealname }}</div>
                                                <div class="hostName">{{ item.fDepartmentName }}</div>
                                                <div class="hostName">{{ item.fAccount }}</div>
                                            </div>
                                        </div>
                                    </el-checkbox-button>
                                </el-checkbox-group>
                            </div>

                            <div class="selectPerson">
                                <div class="selectPersonTitle">
                                    已选人员（{{ newData.length }}人）
                                </div>
                                <div class="selectPersonData">
                                    <div class="selectPersonDataBox" v-for="item in newData" :label="item.fRealname"
                                        :key="item.fRealname">
                                        <div class="MemberIcon">
                                            <img :src="item.fGender == 0 ? girls : boys" alt="" />
                                        </div>
                                        <div class="MemberDetailInfo1">
                                            <div class="name">{{ item.fRealname }}</div>
                                            <div class="hostName">{{ item.fDepartmentName }}</div>
                                            <div class="hostName">{{ item.fAccount }}</div>
                                        </div>
                                        <div class="deleteUser" @click="deteleUser(propTitle, item.fUserid)"></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="newlyAdded_btn" v-if="btnShow">
                    <el-button type="primary" @click="submitMember(propTitle)">保存</el-button>
                    <el-button type="warning" @click="dialogTree = false">关闭</el-button>
                </div>
            </el-dialog>
        </div>
    </div>
</template>
<script src="./index.js">

</script>
<style lang="less" scoped>
@import './index.less';
</style>
